#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

. $CCI_SRC/container/defconfig.sh

docker_rm es-server01

cmd=(
	docker run
	--restart=always
	-d
	-p 9200:9200
	-p 9300:9300
	-v /srv/es:/srv/es
	-v /etc/localtime:/etc/localtime:ro
	--name es-server01
	es:7.11.1
)

"${cmd[@]}"

# set index
check_auth_es_ready 9200
find $CCI_SRC/sbin/ -name "es-*-mapping.sh" -exec sh {} \;
